package com.etime.shycourse.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 *
 * @author wb
 * @since 2022-03-15
 */
@ApiModel(value = "优惠券分为三大类：	1 兑换券	2 抵扣券	3 打折券C", description = "coupon对象")
public class Coupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "couponid", type = IdType.AUTO)
    private Integer couponid;

    private String coupontitle;

    private String couponimg;

    private String coupondesc;

    private Date couponcreatetime;

    @ApiModelProperty(value = "1、线上课程兑换券（需要设置课程兑换数量）；	            2、线上课程抵扣券（无限制）；	            3、线上课程抵扣券（有限制）；	            4、线下培训班抵扣券	            5、线上课程与线下培训班通用抵扣券；	            6、无限制打折券；	            7、指定课程打折券	            说明：这里的限制表示是否限制在指定课程中使用；")
    private Integer coupontype;

    @ApiModelProperty(value = "兑换券的课程兑换数量；非课程兑换券默认为0；课程兑换券取值>0")
    private Integer couponcoursecount;

    @ApiModelProperty(value = "抵扣券的抵扣金额")
    private BigDecimal couponmoney;

    @ApiModelProperty(value = "折扣量；以小数表示")
    private BigDecimal coupondiscount;

    @ApiModelProperty(value = "打折券和抵扣券使用；兑换券默认值为1  0--不限制	     1--限制")
    private Integer couponcourseimpose;

    @ApiModelProperty(value = "抵扣券/打折券使用限制：满多少可用。如果没有限制，其值为0")
    private BigDecimal couponfull;

    @ApiModelProperty(value = "优惠券发放的总数量；如果是不限制发放，则此值默认为0")
    private Integer couponcount;

    @ApiModelProperty(value = "优惠券发放的数量。每发放一张，则数量+1；创建时默认为0")
    private Integer couponsendcount;

    @ApiModelProperty(value = "1-相对有效（领取后N天有效）	 2-绝对时效（一段时间内有效） 3-永久有效")
    private Integer couponeffectivetype;

    @ApiModelProperty(value = "有效时长从发放优惠券开始计算，以天为单位；如果不过期，则设置为0；")
    private Integer couponeffective;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date couponstart;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date couponend;

    @ApiModelProperty(value = "1-有     0-无效")
    private Integer couponstate;

    private Integer couponcreateuserid;
    // 优惠券是否允许重复领取
    private Integer couponallowdre;

    private String couponcreateuser;

    private Integer couponupdateuserid;

    private String couponupdateuser;

    private Date couponupdatetime;

    private String couponfiled3;

    private String couponfiled1;

    private String couponfiled2;

    public Integer getCouponallowdre() {
        return couponallowdre;
    }

    public void setCouponallowdre(Integer couponallowdre) {
        this.couponallowdre = couponallowdre;
    }

    public Integer getCouponid() {
        return couponid;
    }

    public void setCouponid(Integer couponid) {
        this.couponid = couponid;
    }

    public String getCoupontitle() {
        return coupontitle;
    }

    public void setCoupontitle(String coupontitle) {
        this.coupontitle = coupontitle;
    }

    public String getCouponimg() {
        return couponimg;
    }

    public void setCouponimg(String couponimg) {
        this.couponimg = couponimg;
    }

    public String getCoupondesc() {
        return coupondesc;
    }

    public void setCoupondesc(String coupondesc) {
        this.coupondesc = coupondesc;
    }

    public Date getCouponcreatetime() {
        return couponcreatetime;
    }

    public void setCouponcreatetime(Date couponcreatetime) {
        this.couponcreatetime = couponcreatetime;
    }

    public Integer getCoupontype() {
        return coupontype;
    }

    public void setCoupontype(Integer coupontype) {
        this.coupontype = coupontype;
    }

    public Integer getCouponcoursecount() {
        return couponcoursecount;
    }

    public void setCouponcoursecount(Integer couponcoursecount) {
        this.couponcoursecount = couponcoursecount;
    }

    public BigDecimal getCouponmoney() {
        return couponmoney;
    }

    public void setCouponmoney(BigDecimal couponmoney) {
        this.couponmoney = couponmoney;
    }

    public BigDecimal getCoupondiscount() {
        return coupondiscount;
    }

    public void setCoupondiscount(BigDecimal coupondiscount) {
        this.coupondiscount = coupondiscount;
    }

    public Integer getCouponcourseimpose() {
        return couponcourseimpose;
    }

    public void setCouponcourseimpose(Integer couponcourseimpose) {
        this.couponcourseimpose = couponcourseimpose;
    }

    public BigDecimal getCouponfull() {
        return couponfull;
    }

    public void setCouponfull(BigDecimal couponfull) {
        this.couponfull = couponfull;
    }

    public Integer getCouponcount() {
        return couponcount;
    }

    public void setCouponcount(Integer couponcount) {
        this.couponcount = couponcount;
    }

    public Integer getCouponsendcount() {
        return couponsendcount;
    }

    public void setCouponsendcount(Integer couponsendcount) {
        this.couponsendcount = couponsendcount;
    }

    public Integer getCouponeffectivetype() {
        return couponeffectivetype;
    }

    public void setCouponeffectivetype(Integer couponeffectivetype) {
        this.couponeffectivetype = couponeffectivetype;
    }

    public Integer getCouponeffective() {
        return couponeffective;
    }

    public void setCouponeffective(Integer couponeffective) {
        this.couponeffective = couponeffective;
    }

    public Date getCouponstart() {
        return couponstart;
    }

    public void setCouponstart(Date couponstart) {
        this.couponstart = couponstart;
    }

    public Date getCouponend() {
        return couponend;
    }

    public void setCouponend(Date couponend) {
        this.couponend = couponend;
    }

    public Integer getCouponstate() {
        return couponstate;
    }

    public void setCouponstate(Integer couponstate) {
        this.couponstate = couponstate;
    }

    public Integer getCouponcreateuserid() {
        return couponcreateuserid;
    }

    public void setCouponcreateuserid(Integer couponcreateuserid) {
        this.couponcreateuserid = couponcreateuserid;
    }

    public String getCouponcreateuser() {
        return couponcreateuser;
    }

    public void setCouponcreateuser(String couponcreateuser) {
        this.couponcreateuser = couponcreateuser;
    }

    public Integer getCouponupdateuserid() {
        return couponupdateuserid;
    }

    public void setCouponupdateuserid(Integer couponupdateuserid) {
        this.couponupdateuserid = couponupdateuserid;
    }

    public String getCouponupdateuser() {
        return couponupdateuser;
    }

    public void setCouponupdateuser(String couponupdateuser) {
        this.couponupdateuser = couponupdateuser;
    }

    public Date getCouponupdatetime() {
        return couponupdatetime;
    }

    public void setCouponupdatetime(Date couponupdatetime) {
        this.couponupdatetime = couponupdatetime;
    }

    public String getCouponfiled3() {
        return couponfiled3;
    }

    public void setCouponfiled3(String couponfiled3) {
        this.couponfiled3 = couponfiled3;
    }

    public String getCouponfiled1() {
        return couponfiled1;
    }

    public void setCouponfiled1(String couponfiled1) {
        this.couponfiled1 = couponfiled1;
    }

    public String getCouponfiled2() {
        return couponfiled2;
    }

    public void setCouponfiled2(String couponfiled2) {
        this.couponfiled2 = couponfiled2;
    }

    @Override
    public String toString() {
        return "Coupon{" +
                "couponid=" + couponid +
                ", coupontitle=" + coupontitle +
                ", couponimg=" + couponimg +
                ", coupondesc=" + coupondesc +
                ", couponcreatetime=" + couponcreatetime +
                ", coupontype=" + coupontype +
                ", couponcoursecount=" + couponcoursecount +
                ", couponmoney=" + couponmoney +
                ", coupondiscount=" + coupondiscount +
                ", couponcourseimpose=" + couponcourseimpose +
                ", couponfull=" + couponfull +
                ", couponcount=" + couponcount +
                ", couponsendcount=" + couponsendcount +
                ", couponeffectivetype=" + couponeffectivetype +
                ", couponeffective=" + couponeffective +
                ", couponstart=" + couponstart +
                ", couponend=" + couponend +
                ", couponstate=" + couponstate +
                ", couponcreateuserid=" + couponcreateuserid +
                ", couponcreateuser=" + couponcreateuser +
                ", couponupdateuserid=" + couponupdateuserid +
                ", couponupdateuser=" + couponupdateuser +
                ", couponupdatetime=" + couponupdatetime +
                ", couponfiled3=" + couponfiled3 +
                ", couponfiled1=" + couponfiled1 +
                ", couponfiled2=" + couponfiled2 +
                "}";
    }
}
